﻿
// define metadata class for validators

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace GeodeticDistance.Models
{
    [MetadataType(typeof(CityData))]
    public partial class CityLocation
    {
        // ...
    }

    // metadata class for Student (partial definitions here and in StudentModel.Designer.cs
    public class CityData
    {
        public static String[] Countries
        {
            get
            {
                return new String[] { "Ireland", "England" };
            }
        }

        public static String[] Cities
        {
            get
            {
                return new String[] { "Dublin", "Cork", "Galway", "London", };
            }
        }

        [Required]
        public String Country { get; set; }

        [Required]
        public String City { get; set; }

        [Required]
        public float Latitude { get; set; }
    
        [Required]
        public float Longitude { get; set; }
    }
}